// import fetch from 'utils/fetch';

// export function dowloadFile(query) {
//   return fetch({
//     url: '/file/download',
//     method: 'get',
//     params: query
//   });
// }
/**
 * 创建api对象
 */
//HTTP_OK:200 http:
let Api = {
  resultCode:{
    SUSS:200,
    TOKEN_EXP:600
  } 
};

let requireContext = require.context('./', false, /\.api.js$/);
requireContext.keys().forEach(path => {
  let apiObject = requireContext(path).default;
  if(apiObject){
    let key = path.match(/\.\/(\w+).api/)[1];
    Api[key] = apiObject;
  }
  
});

export default Api;